package cn.wolfcode.review.service.impl;

import cn.wolfcode.review.domain.Department;
import cn.wolfcode.review.domain.Employee;
import cn.wolfcode.review.mapper.DepartmentMapper;
import cn.wolfcode.review.mapper.EmployeeMapper;
import cn.wolfcode.review.service.IDepartmentService;
import cn.wolfcode.review.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements IEmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public void save(Employee employee) {
        employeeMapper.insert(employee);
    }

    @Override
    public Employee selectByName(String name) {
        return employeeMapper.selectByName(name);
    }

    @Override
    public void delete(Long id) {
        employeeMapper.deleteByPrimaryKey(id);
    }
}
